Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(serializer): Serialize void elements as "" #442

Merged
merged 3 commits into from
Mar 7, 2022
Merged

Conversation

fb55
Copy link
Collaborator

@fb55 fb55 commented Mar 7, 2022

Fixes #289

Copy link
Collaborator

@wooorm wooorm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, otherwise 👍

packages/parse5/lib/serializer/index.test.ts Outdated Show resolved Hide resolved
Co-authored-by: Titus <tituswormer@gmail.com>
@wooorm
Copy link
Collaborator

wooorm commented Mar 7, 2022

An optional idea: it could be good to test what happens to these known “void” elements in SVG/MathML contexts. As there void from HTML does not exist, but self-closing from XML does.

@fb55
Copy link
Collaborator Author

fb55 commented Mar 7, 2022

@wooorm Thanks for the reviews!

it could be good to test what happens to these known “void” elements in SVG/MathML contexts. As there void from HTML does not exist, but self-closing from XML does

Good idea, added!

@fb55 fb55 enabled auto-merge (squash) March 7, 2022 14:34
@fb55 fb55 merged commit 1c7f792 into master Mar 7, 2022
@fb55 fb55 deleted the serialize-void branch March 8, 2022 11:01
jmbpwtw pushed a commit to jmbpwtw/parse5 that referenced this pull request Feb 16, 2023
Co-authored-by: Titus <tituswormer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Serialize the children of void elements as the empty string
2 participants